import { h5Url } from "./env.config";
import { ProtocolLink } from "./env.config.js"
export const useProtocolLink = () => {
  return {
		ProtocolLink,
		toUserServicesAgreement: () =>{
			uni.navigateTo({
				url: `/pages/webview/webview?url=${encodeURIComponent(ProtocolLink.userServicesAgreement)}`
			})
		},
		toPrivacyPolicy: () =>{
			uni.navigateTo({
				url: `/pages/webview/webview?url=${encodeURIComponent(ProtocolLink.privacyPolicy)}`
			})
		},
		toRealNameAuthentication: () =>{
			uni.navigateTo({
				url: `/pages/webview/webview?url=${encodeURIComponent(ProtocolLink.realNameAuthentication)}`
			})
		},
		toFaceRecognition: () =>{
			uni.navigateTo({
				url: `/pages/webview/webview?url=${encodeURIComponent(ProtocolLink.faceRecognition)}`
			})
		},
		toRiskWarningNotice: () =>{
			uni.navigateTo({
				url: `/pages/webview/webview?url=${encodeURIComponent(ProtocolLink.riskWarningNotice)}`
			})
		},
		toPersonalInformationAuthorized: () =>{
			uni.navigateTo({
				url: `/pages/webview/webview?url=${encodeURIComponent(ProtocolLink.personalInformationAuthorized)}`
			})
		}
	}
};
